package com.spring.boot.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.spring.boot.entity.Insurance;
import com.spring.boot.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: Daniel ZTQ
 * @Date: 2021/01/01 12:13
 * @Description: TODO
 */
@Service
public interface InsuranceMapper extends BaseMapper<Insurance> {
    /**
     * 根据险种名称进行筛选查询
     */
    @Select("select * from insurance where insurance_name=#{insuranceName}")
    List<Insurance> getInsuranceByInsuranceName(@Param("insuranceName") String insuranceName);

    /**
     * 根据险种id 进行查询险种信息
     */

    @Select("select * from insurance where insurance_id=#{insuranceId}")
    Insurance getInsuranceByinsuranceId(@Param("insuranceId") String insuranceId);

    /**
     * 获取所有合同信息
     * */
    @Select("select * from insurance")
    List<Insurance> getInsuranceAll();
}
